new Vue({
    el: "#app",
    data() {
        return {
            main: '',
        };
    },
    mounted() {
        const Reptile_Main = sessionStorage.getItem("Reptile_Main")
        this.getData(Reptile_Main);
    },
    methods: {
        getData(Reptile_Main) {
            const that = this;
            $.ajax({
                url: DomainName + '/getReptileMainAction?token=' + $.cookie('token'),
                type: 'POST',
                data: {
                    Reptile_Main
                },
                success: function (res) {
                    if (res.Status == 'success') {
                        that.main = res.Data
                    }  
                },
                error: function () {
                    that.$message.error("操作失败，请稍后再试")
                },
                complete: function (XMLHttpRequest) {
                    that.loading = false
                    if (XMLHttpRequest.getResponseHeader("REDIRECT") == "REDIRECT") {
                        window.parent.document.location.href = absolutepath() + XMLHttpRequest.getResponseHeader("CONTENTPATH");
                    }
                }
            })
        }
        
    },
});
